{%extends "base/page.html"%}
{%block title%}Security Information{%endblock%}
{%block contents%}

<h1>Security Information <i class="fas fa-lock"></i></h1>

<p>
If you wish to report a new security vulnerability in PostgreSQL, please
send an email to
<a href="mailto:security@postgresql.org">security@postgresql.org</a>.
For reporting non-security bugs, please see the <a href="/account/submitbug/">Report a Bug</a> page.
</p>

{%if version and not version.supported%}
<h1>UNSUPPORTED VERSION</h1>
<p>
You are currently viewing security issues for an unsupported version. If
you are still using PostgreSQL version {{version}}, you should upgrade as
soon as possible!
</p>
{%else%}
<p>

The PostgreSQL Global Development Group (PGDG) takes security seriously,
allowing our users to place their trust in the web sites and applications
built around PostgreSQL. Our approach covers fail-safe configuration options,
a secure and robust database server as well as good integration with other
security infrastructure software.
</p>

<p>
PostgreSQL security updates are primarily made available as <a href="/support/versioning/">minor version</a>
upgrades. You are always advised to use the latest minor version available,
as it will likely also contain other non-security related fixes. All known
security issues are always fixed in the next major release, when it comes out.
</p>

<p>
PGDG believes that accuracy, completeness and availability of security
information is essential for our users. We choose to pool all information on
this one page, allowing easy searching for vulnerabilities by a range of
criteria.
</p>

<p>
Vulnerabilities list which major releases they were present
in, and which version they are fixed in for each. If the vulnerability
was exploitable without a valid login, this is also stated. They also
list a vulnerability class, but we urge all users to read the description
to determine if the bug affects specific installations or not.
</p>

{%endif%}

<h2>Known security issues in {%if version%}version {{version.numtree}}{%else%}all supported versions{%endif%}</h2>
<p>
You can filter the view of patches to show just patches for version:<br/>
{%for v in supported%}
<a href="/support/security/{{v.numtree}}/">{{v.numtree}}</a>{%if not forloop.last%} -{%endif%}
{%endfor%}
- <a href="/support/security/">all</a>
</p>

<table class="table table-striped">
  <thead class="thead-light">
    <tr>
      <th>Reference</th>
      <th>Affected</th>
      <th>Fixed</th>
      <th><a href="#comp">Component</a> & CVSS v3 Base Score</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    {%for p in patches%}
      <tr>
        <td>
          {%if p.cve%}<span class="nobr"><a href="/support/security/CVE-{{ p.cve }}/">CVE-{{p.cve}}</a></span><br/>{%endif%}
          {%if p.newspost%}<a href="/about/news/{{p.newspost.title|slugify}}-{{p.newspost.id}}/">Announcement</a><br/>{%endif%}
        </td>
        <td>{{p.affected|join:", "}}</td>
        <td>{{p.fixed|join:", "}}</td>
        <td>{{p.component}}<br/>
          {%if p.cvssscore >= 0%}<a href="https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector={{p.cvssvector}}">{{p.cvssscore}}</a><br/><span class="cvssvector">{{p.cvssvector}}</span>
    {%else%}Legacy: {{p.legacyscore}}{%endif%}</td>
        <td>{{p.description}}<br/><br/><a href="/support/security/CVE-{{ p.cve }}/">more details</a></td>
      </tr>
    {% endfor %}
  </tbody>
</table>

<h3>Unsupported versions</h3>
<p>
  You can also view archived security patches for unsupported versions. Note that no further
  security patches are made available for these versions as they are end of life.<br/>
{%for v in unsupported%}
<a href="/support/security/{{v.numtree}}/">{{v.numtree}}</a>{%if not forloop.last%} -{%endif%}
{%endfor%}
</p>


<h2 id="comp">Components</h2>
<p>
The following component references are used in the above table:
</p>

<table class="table table-striped">
  <thead class="thead-light">
    <tr>
      <th>Component</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
      <tr>
       <td>core server</td>
       <td>This vulnerability exists in the core server product.</td>
      </tr>

      <tr>
       <td>client</td>
       <td>This vulnerability exists in a client library or client application only.</td>
      </tr>

      <tr>
       <td>contrib module</td>
       <td>This vulnerability exists in a contrib module. Contrib modules are not installed by default when PostgreSQL is installed from source. They may be installed by binary packages.</td>
      </tr>

      <tr>
       <td>client contrib module</td>
       <td>This vulnerability exists in a contrib module used on the client only.</td>
      </tr>

      <tr>
       <td>packaging</td>
       <td>This vulnerability exists in PostgreSQL binary packaging, e.g. an installer or RPM.</td>
      </tr>
  </tbody>
</table>


{%endblock%}
